package com.atguigu.mybatis.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName t_animal
 */
@Data
public class Animal implements Serializable {
    /**
     * 
     */
    private String animalId;

    /**
     * 
     */
    private String animalName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Animal other = (Animal) that;
        return (this.getAnimalId() == null ? other.getAnimalId() == null : this.getAnimalId().equals(other.getAnimalId()))
            && (this.getAnimalName() == null ? other.getAnimalName() == null : this.getAnimalName().equals(other.getAnimalName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAnimalId() == null) ? 0 : getAnimalId().hashCode());
        result = prime * result + ((getAnimalName() == null) ? 0 : getAnimalName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", animalId=").append(animalId);
        sb.append(", animalName=").append(animalName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}